package com.haixue.android.academy.adapter;

import android.academy.haixue.com.haixue.R;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

import com.haixue.android.academy.fragment.NaviagtionFragment;

/**
 * Created by ren on 2015/6/1 0001.
 */
public class NavigationAdapter extends FragmentPagerAdapter {
    private int navigationPageBkg[] = { R.drawable.ui_guide_bkg_1, R.drawable.ui_guide_bkg_2, R.drawable.ui_guide_bkg_3 };
    private int navigationPage[] = { R.drawable.ui_guide_1, R.drawable.ui_guide_2, R.drawable.ui_guide_3 };

    public NavigationAdapter(FragmentManager fm) {
        super(fm);
    }

    @Override
    public Fragment getItem(int position) {
        NaviagtionFragment naviagtionFragment = NaviagtionFragment.newInstance(position, navigationPage.length,navigationPageBkg[position],navigationPage[position]);
        return naviagtionFragment;
    }

    @Override
    public int getCount() {
        return navigationPage.length;
    }
}
